<template>
  <div class="yjyInput">
    <slot name="icon"></slot>
    <input
      type="text"
      v-model="val"
      :placeholder="placeholder ? placeholder : '请输入'"
    />
  </div>
</template>
<script setup>
import { defineProps, defineModel } from "vue";
const val = defineModel();
const props = defineProps({
  placeholder: String,
});
</script>
<style scoped>
.yjyInput {
  display: flex;
  width: 100%;
  border: 1px solid #ccc;
}
.yjyInput input {
  flex: 1;
  border: none;
  outline: none;
  padding-left: 5px;
}
</style>
